package org.jeecg.controller;

import org.jeecg.domain.dto.OrdersServeDto;
import org.jeecg.domain.dto.RenDto;
import org.jeecg.service.OrdersServeService;
import org.jeecg.utils.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/ordersServe")
public class OrdersServeController {
    @Autowired
    private OrdersServeService ordersServeService;
    @GetMapping("/findPage")
    public ResponseResult findPage(OrdersServeDto dto){
        return ordersServeService.findPage(dto);
    }
    @GetMapping("/findServeName")
    public ResponseResult findServeName(){
        return ordersServeService.findServeName();
    }
    @GetMapping("/updateRen")
    public ResponseResult updateRen(RenDto dto){
        return ordersServeService.updateRen(dto);
    }
    @GetMapping("/exitOrder")
    public ResponseResult exitOrder(@RequestParam("id") String id){
        return ordersServeService.exitOrder(id);
    }
    @GetMapping("/startServe")
    public ResponseResult startServe(RenDto dto){
        return ordersServeService.startServe(dto);
    }
    @GetMapping("/delOrder")
    public ResponseResult delOrder(@RequestParam("id") String id){
        return ordersServeService.delOrder(id);
    }
    @GetMapping("/getOneById")
    public ResponseResult getOneById(@RequestParam("id") String id){
        return ordersServeService.getOneById(id);
    }
}
